package com.dgshanger.sanhxiaofeisc.ui.person

import com.dgshanger.sanhxiaofeisc.R
import com.dgshanger.sanhxiaofeisc.mvp.contract.EditNicknameContract
import com.dgshanger.sanhxiaofeisc.mvp.presenter.EditNicknamePresenter
import com.xx.baseuilibrary.mvp.BaseMvpActivity
import kotlinx.android.synthetic.main.activity_edit_nickname.*


/**
 * EditNicknameActivity
 * 沉迷学习不能自拔
 * Describe：修改昵称页面
 * Created by 雷小星🍀 on 2018/4/16 14:34.
 */
class EditNicknameActivity : BaseMvpActivity<EditNicknameContract.Model, EditNicknameContract.View, EditNicknamePresenter>(), EditNicknameContract.View {

    override fun createPresenter(): EditNicknamePresenter = EditNicknamePresenter()

    override val nickname: String
        get() = et_nickname.text.toString()

    override fun getActivityLayoutId(): Int = R.layout.activity_edit_nickname

    override fun initData() {
    }

    override fun initEvent() {
        btn_sure.setOnClickListener {
            //修改昵称
            getPresenter().editNickname()
        }
    }
}